package com.gljx.web.service.impl;

import com.gljx.web.Entity.ActiveProcessEntry;
import com.gljx.web.dao.ProcessEntryMapper;
import com.gljx.web.service.ProcessEntryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class ProcessEntryServiceImpl implements ProcessEntryService {

    @Autowired
    private ProcessEntryMapper processEntryMapper;

    @Override
    public List<ActiveProcessEntry> selProcessEntryByFid(String fid) {
        return processEntryMapper.selProcessEntryByFid(fid);
    }

    @Override
    public void saveActiveProcessEntry(ActiveProcessEntry activeProcessEntry) {
        processEntryMapper.insertSelective(activeProcessEntry);
    }

    @Override
    public void updateActiveProcessEntry(ActiveProcessEntry activeProcessEntry) {
        processEntryMapper.updateByPrimaryKeySelective(activeProcessEntry);
    }

    @Override
    public ActiveProcessEntry selProcessAssginee(String fcompanyid, String exitClazz) {
        Map<String,Object> map = new HashMap<>();
                           map.put("fcompanyid",fcompanyid);
                           map.put("process",exitClazz);
        return processEntryMapper.selProcessAssginee(map);
    }


}
